$(function(){
	$('.app-thumbnail').each(function(){
		var e = $(this);
		if(e.attr("title")=="") return;
		e.bt('<img src="'+e.attr("title")+'" width="400" height="300" />', 
		{
			width: 400, 
			height: 300,
			fill: 'white',
			strokeStyle: '#999',
			shrinkToFit: true,
			hoverIntentOpts: {interval: 0,timeout: 0}
		});
	});
});


function deleteApp(id)
{
	if(confirm('本操作不可恢复, 确认要删除吗?'))
	{
		$.ajax({
			type: "GET",
			url: "./?app=app&task=ajax_delete&id="+id,
			dataType: "json",
			success: function(json){
				if(json.status=="0")
				{
					$("#row-"+id).remove();
				}
				else
				{
					alert(json.description);
				}
			}
		});	
	}
}
